package com.hq.service;

import com.hq.bean.User;
import com.hq.dao.UserDAO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserDAO userDAO;

    @Override
    public List list() {
        return userDAO.selectList(null);
    }

    @Override
    public int addUser(User user) {
        return userDAO.insert(user);
    }

    @Override
    public int delUser(int i) {
        return userDAO.deleteById(i);
    }
}
